package cn.iocoder.yudao.module.iot.enums;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Arrays;

/**
 * 设备类型 枚举
 *
 * @author 陈賝
 * @since 2023/6/13 13:53
 */
@RequiredArgsConstructor
@Getter
public enum DeviceTypeEnum implements IntArrayValuable {

    LED_LIGHT(1, "LED灯"),
    WATER_ALARM(2, "水浸报警器"),
    ;

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeviceTypeEnum::getType).toArray();

    /**
     * 类型
     */
    private final Integer type;
    /**
     * 名字
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }
}
